﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Linq;
using Manager.App_Code;
using Manager.Common;
using Manager.ViewModels;

namespace Manager.FormAdd_Edit
{
    public partial class frm_XemTienCoc : DevExpress.XtraEditors.XtraForm
    {
        NewPearl_HotelDataContext db = new NewPearl_HotelDataContext();

        public frm_XemTienCoc()
        {
            InitializeComponent();
        }

        private void frm_XemTienCoc_Load(object sender, EventArgs e)
        {
            dateTuNgay.DateTime = DateTime.Now;
            dateDenNgay.DateTime = DateTime.Now;
            Search(DateTime.Now.Date, DateTime.Now.Date);
        }

        private void btnFind_Click(object sender, EventArgs e)
        {

        }

        private void Search(DateTime tuNgay, DateTime denNgay)
        {
            var lstDangKyPhong = db.PhieuDangKyPhongs.Where(t => tuNgay <= t.NgayDen.Value.Date && t.NgayDen.Value.Date <= denNgay).ToList();
            if (lstDangKyPhong.Count > 0)
            { 
                
            }
        }
    }
}